﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CRM系统-合同</title>
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- Bootstrap Styles-->
<script src="assets/js/bootstrap.min.js"></script>
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FontAwesome Styles-->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- Morris Chart Styles-->
<link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
<!-- Custom Styles-->
<link href="assets/css/custom-styles.css" rel="stylesheet" />
<!-- Google Fonts-->
<link href='https://fonts.googleapis.com/css?family=Open+Sans'
	rel='stylesheet' type='text/css' />
<link rel="stylesheet"
	href="assets/js/Lightweight-Chart/cssCharts.css">
<!-- 地区-->
<link rel="stylesheet" type="text/css"
	href="assets/css/cityPicker.css">
<script type="text/javascript" src="assets/js/cityData.js"></script>
<script type="text/javascript" src="assets/js/cityPicker.js"></script>
<!-- 时间-->
<link rel="stylesheet" type="text/css" media="all"
	href="/CRM/assets/css/daterangepicker.css" />
<script type="text/javascript" src="assets/js/moment.js"></script>
<script type="text/javascript" src="assets/js/daterangepicker.js"></script>
<style type="text/css">
    #msg{
    height: 4rem;
    text-align: center;
    position: fixed;
    top: 20%;
    margin-top: -1rem;
    line-height: 4rem;
    width: 100%;
    }
    #msg span{
    color: #fff;
    background: rgba(0,0,0,0.6);
    height: 4rem;
    display: inline-block;
    padding: 0 3rem;
    border-radius: 5px;
    }
    </style>
    
<script type="text/javascript">
        $(function() {
        	
        	function alert(e){
                $("body").append("<div id='msg'><span>"+e+"</span></div>");
                clearmsg();
            }
            function clearmsg(){
                var t = setTimeout(function(){
                    $("#msg").remove();
                },2000)
            };
        	var currentPageno =1 ;
getName();
        	
        	getMenu();
        	getPage(currentPageno);
        			 $("#a1").click(function(){
        	                if(currentPageno<=1){           
        	             	   getPage(1);
        	                }else{
        	             
        	      		     getPage(--currentPageno);
        	      		   }
        	      		});
        	      	    $('#a2').bind("click", function(){
        	      	    	
        	      	    	var total =$('#totalpage').html();
        	      	    	
        	      	    	if (currentPageno>=total) {
        	      	    		 getPage(currentPageno);
							}else{
	        	      		      getPage(++currentPageno);

							}
        	      		   });
        		
        	
            <!-- 日期选择器配置-->
            $('input[name="birthdate"]').daterangepicker({
                autoUpdateInput:true,
                singleDatePicker: true,
                showDropdowns: true,
                timePicker:true,
                "locale": {
                    "format": "MM/DD/YYYY h:mm A",
                    "daysOfWeek": [
                        "日",
                        "一",
                        "二",
                        "三",
                        "四",
                        "五",
                        "六"
                    ],
                    "monthNames": [
                        "一月",
                        "二月",
                        "三月",
                        "四月",
                        "五月",
                        "六月",
                        "七月",
                        "八月",
                        "九月",
                        "十月",
                        "十一月",
                        "十二月"
                    ],
                    "applyLabel": "确定",
                    "cancelLabel": "取消"
                }
            });
            $('input[name="daterange"]').daterangepicker({
                alwaysShowCalendar:true,
                "locale": {
                    "format": "MM/DD/YYYY",
                    "daysOfWeek": [
                        "日",
                        "一",
                        "二",
                        "三",
                        "四",
                        "五",
                        "六"
                    ],
                    "monthNames": [
                        "一月",
                        "二月",
                        "三月",
                        "四月",
                        "五月",
                        "六月",
                        "七月",
                        "八月",
                        "九月",
                        "十月",
                        "十一月",
                        "十二月"
                    ],
                    "applyLabel": "确定",
                    "cancelLabel": "取消"
                }
            });
            <!-- 保存按钮点击事件-->
            $("button[name='save']").click(function(){
                alert( $("#contractname").val());
                $.ajax({
                    type:'get',
                    url:"/CRM/contract/saveContract.action",
                    data:{
                        hname:$("#contractname").val(),
                        hclient_name:$("#contractcon").val(),
                        hchance_name:$("#contractcha").val(),
                        htol_amt:$("#contractmoy").val(),
                        hcontract_date:$("#contractday").val(),
                        hstart_date: $('#contractsday').val(),
                        hend_date:$("#contracteday").val(),
                        hstate:$("#contractstate").val(),
                        hnumber:$("#contractnum").val(),
                        hstyle:$("#contractleixing").val(),
                        hclient_singer:$("#contractnamekehu").val(),
                        hcompany_singer:$("#contractwo").val(),
                        haccessory:$("#contractfujian").val()
                    },
                    dataType:'text',
                    contentType:"application/json;charset=utf-8",
                    success:function(data){
                        alert("dsdsds"+data);
                        if(data=="success"||data=="insert succeed"){
                        	
                            window.location.reload();
                        }else{
                        	
                        }
                     }
                })
            });
        });
function getName(){
        	
        	$.ajax({
        		url:'getname.action',
        		type: "post",
        		async: false,
        		dataType: 'json',
                success: function (data) {
                	
                	$("#PICname").val(data.pc_id);
                	
                	$("#userName").html(data.pc_name);
                	
                	
                }
        		
        	})
        }
        function getMenu(){
        	
        	  $.ajax({
        		type:"get",
        		url:"/CRM/menu/getMenuTreeByRole.action",
        		data:{
        			user:$("#PICname").val()
        		},
        		async: false,
        		contentType:"application/json;charset=utf-8",
        		dataType:'json',
        		
        		
        		success:function(data){
        	       var str = '' ;
        	       
        	       str += '<nav class="navbar-default navbar-side" role="navigation"><div class="sidebar-collapse">';
        	       str += '<ul class="nav" id="main-menu"><li id="addMenu">';
        	       str += '<a href="index.html"><i class="fa fa-home"></i> 首页</a></li>';
        	       
        	       
        			$.each(data,function(index,menuTree){
        				str += '<li><a href="#"><i class="fa fa-sitemap"></i>'+menuTree.text+'<span class="fa arrow"></span></a>' ;
        				str += '<ul class="nav nav-second-level">';
        				$.each(menuTree.children,function(index,menu){
            				str += '<li><a href="'+menu.url+'">'+menu.text+'</a></li>' ;
            			})
            			str += '</ul></li>';
        			})
        			
        	
        			
        			str += '<li><a href="analysis.html"><i class="fa fa-bar-chart-o"></i> 统计分析</a>';
        			str += '</li></ul></div></nav>';
        			
        			$('#addMenu').html(str);

        		
        			
        		}
        	});
        }
        function byebye(){
    		$.ajax({
    			url:'byebye.action',
    			type:'post',
    			success:function(data){
    				location.reload();
    			}
    		})
    	}
	function getPage(currentPageno) {
        var i = 1;
        var pageno = $("#pageno").val(i);

        $.ajax({
            url: "/CRM/contract/getPage.action",
            type: "post",
            data: {
                pageno: currentPageno,
                pagesize: 6
            },
            dataType: 'json',

            success: function (data) {
                var str = '';
                $.each(data.data, function (index, contract) {

                    str += '<tr>';
                    str += '<td><label><input type="checkbox" name="test" value='+contract.hid+'></label></td>';
                    str += '<td><a href="contract-details.html">' + contract.hname + '</a></td>';
                    str += '<td><a href="customer-details.html">' + contract.hclient_name + '</a></td>';
                    str += '<td>' + contract.hnumber + '</td>';
                    str += '<td>' + contract.htol_amt + '</td>';
                    str += '<td>' + contract.hstate + '</td>';
                    str += '<td>' + contract.hproduct + '</td>';
                    str += '<td><input type="hidden" id="taskId" value="'+contract.deptno+'" </td>';
                    str += '</tr>';

                })
                $("#contractbody").html(str);

                $('#pageno').html(data.currentPageno);
                $('#totalpage').html(data.totalPage);
                $('#totalNum').html(data.totalNum);
            }
        })
    }
	 
	//提交流程
    function start(){ 
    	var obj=document.getElementsByName('test'); //选择所有name="'test'"的对象，返回数组 
    	//取到对象数组后，我们来循环检测它是不是被选中 
    	var s=''; 
    	for(var i=0; i<obj.length; i++){ 
    	if(obj[i].checked) 
    	s+=obj[i].value; //如果选中，将value添加到变量s中 
    	} 
    	//那么现在来检测s的值就知道选中的复选框的值了 
    	
    	$.ajax({
    		  url:'/CRM/WF/startProcess.action',
    		  type:'post',
				data:{
					leaveId:s
				},
				
      		dataType:'text',
      		success:function(data){        			
      			
                window.location.reload();
      		} 				
      	}); 
    	} 

            </script>

</head>

<body>
	<div id="wrapper">
		<nav class="navbar navbar-default top-navbar" role="navigation">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target=".sidebar-collapse">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="index.html"><strong>CRM系统</strong></a>

				<div id="sideNav" href="">
					<i class="fa fa-caret-right"></i>
				</div>
			</div>

			<ul class="nav navbar-top-links navbar-right">

				<!-- /.dropdown -->
				<li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown" href="#" aria-expanded="false"> <i
						class="fa fa-bell fa-fw"></i> 通知&nbsp;<i class="fa fa-caret-down"></i>
				</a>
					<ul class="dropdown-menu dropdown-alerts">
						<li><a class="text-center" href="#">
								<div>
									<i class="fa fa-tasks fa-fw"></i> 共有4条新消息

								</div>
						</a></li>
						<li class="divider"></li>
						<li><a href="#">
								<div>
									<i class="fa fa-comment fa-fw"></i> 新消息 <span
										class="pull-right text-muted small">5 min 前</span>
								</div>
						</a></li>
						<li class="divider"></li>
						<li><a href="#">
								<div>
									<i class="fa fa-comment fa-fw"></i> 新消息 <span
										class="pull-right text-muted small">6 min 前</span>
								</div>
						</a></li>
						<li class="divider"></li>
						<li><a href="#">
								<div>
									<i class="fa fa-comment fa-fw"></i> 新消息 <span
										class="pull-right text-muted small">7 min 前</span>
								</div>
						</a></li>
						<li class="divider"></li>
						<li><a href="#">
								<div>
									<i class="fa fa-comment fa-fw"></i> 新消息 <span
										class="pull-right text-muted small">8 min 前</span>
								</div>
						</a></li>
						<li class="divider"></li>
						<li><a class="text-center" href="#"> <strong>查看所有消息</strong>
								<i class="fa fa-angle-right"></i>
						</a></li>
					</ul> <!-- /.dropdown-alerts --></li>
				<!-- /.dropdown -->
				<li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown" href="#" aria-expanded="false"> <i
						class="fa fa-user fa-fw"></i> <input type="hidden" id="PICname"  readonly/>
                        <span id="userName"></span> <i class="fa fa-caret-down"></i>
				</a>
					<ul class="dropdown-menu dropdown-user">
						<li><a href="#" data-toggle="modal"
							data-target="#information"><i class="fa fa-user fa-fw"></i>
								个人信息</a></li>
						<li class="divider"></li>
						<li><a href="#"><i class="fa fa-gear fa-fw"></i> 个性化首页</a></li>
						<li class="divider"></li>
						<li><a href="#" data-toggle="modal" data-target="#out"><i
								class="fa fa-sign-out fa-fw"></i> 安全退出</a></li>
					</ul> <!-- /.dropdown-user --></li>
				<!-- /.dropdown -->
			</ul>
		</nav>
		<!--个人信息-->
		<div class="modal fade" id="information" tabindex="-1" role="dialog"
			aria-labelledby="informationLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="informationLabel">编辑信息</h4>
					</div>
					<div class="modal-body text-center">

						<form class="bs-example bs-example-form" role="form">
							<div class="input-group">
								<span class="input-group-addon">姓名：</span> <input type="text"
									class="form-control" placeholder="张三">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">邮箱：</span> <input type="text"
									class="form-control" placeholder="123456879@qq.com">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">部门：</span> <input type="text"
									class="form-control" placeholder="销售部门" disabled="disabled">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">职务：</span> <input type="text"
									class="form-control" placeholder="部门经理">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">性别：</span> <input type="radio"
									class="" value="0" name="sex">男
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input
									type="radio" class="" value="1" name="sex">女
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">头像：</span> <input type="file"
									class="form-control">
							</div>
						</form>

					</div>
					<div class="modal-footer">

						<button type="button" class="btn btn-primary" name="save">
							保存</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
		<!--新增合同-->
		<div class="modal fade" id="addClue" tabindex="-1" role="dialog"
			aria-labelledby="informationLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="addClueLabel">新增合同</h4>
					</div>
					<div class="modal-body text-center pre-scrollable">

						<form class="bs-example bs-example-form" role="form">
							<div class="input-group">
								<span class="input-group-addon">合同名称：</span> <input type="text"
									class="form-control" placeholder="" id="contractname">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">对应客户：</span> <input type="text"
									class="form-control" placeholder="" id="contractcon">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">对应机会：</span> <input type="text"
									class="form-control" placeholder="" id="contractcha">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">合同金额：</span> <input type="text"
									class="form-control" placeholder="" id="contractmoy">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">签约日期：</span> <input type="text"
									class="form-control" name="birthdate" value="" id="contractday"/>
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">开始日期：</span> <input type="text"
									class="form-control" name="birthdate" value="" id="contractsday"/>
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">结束日期：</span> <input type="text"
									class="form-control" name="birthdate" value="" id="contracteday"/>
							</div>
							
							<br>
							<div class="input-group">
								<span class="input-group-addon">合同编号：</span> <input type="text"
									class="form-control" placeholder="" id="contractnum">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">合同类型：</span> <select
									class="form-control" id="contractleixing">
									<option>选择合同类型</option>
									<option>直销合同</option>
									<option>代理合同</option>
									<option>采购合同</option>
									<option>服务合同</option>
									<option>其它</option>
								</select>
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">客户方签约人：</span> <input
									type="text" class="form-control" placeholder="" id="contractnamekehu">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">我方签约人：&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="text" class="form-control" placeholder="" id="contractwo">
							</div>
							<br>
							<div class="input-group">
								<span class="input-group-addon">合同附件：</span> <input type="file"
									class="form-control" placeholder="" id="contractfujian">
							</div>

						</form>

					</div>
					<div class="modal-footer">

						<button type="button" class="btn btn-default" name="savecaogao">
							保存草稿</button>

						<button type="button" class="btn btn-primary" name="save">
							保存</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
		<!--安全退出-->
		<div class="modal fade" id="out" tabindex="-1" role="dialog"
			aria-labelledby="outLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="outLabel">确定要退出吗？</h4>
					</div>
					<div class="modal-body">&nbsp;</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" onclick="byebye()">安全退出</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
		<!--/. NAV TOP  -->
		<div id="addMenu"></div>
		<!-- /. NAV SIDE  -->

		<div id="page-wrapper">
			<div class="header">
				<h1 class="page-header">
					销售管理 <small>合同</small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="index.html">CRM系统</a></li>
					<li><a href="#">销售管理</a></li>
					<li class="active">合同</li>
				</ol>

			</div>
			<div>
				<button type="button" class="btn btn-default" data-toggle="modal"
					data-target="#addClue" style="float: right; margin-right: 40px">
					<i class="fa fa-folder fa-fw"></i>新建合同
				</button>
			</div>
			<div id="page-inner">

				<!-- /. ROW  -->

				<ul id="myTab" class="nav nav-tabs">
					<li class="active"><a href="#allClue" data-toggle="tab">
							全部合同 </a></li>
					<li><a href="#myClue" data-toggle="tab">我的合同</a></li>
					<li><a href="#customer" data-toggle="tab">我协作的合同</a></li>
					<li><a href="#caogao" data-toggle="tab">我的草稿</a></li>
				</ul>
				<div id="myTabContent" class="tab-content breadcrumb">
					<br>
					<!--全部合同-->
					<div class="tab-pane fade in active text-left" id="allClue">
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>合同状态：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="签约">
								<input type="button" class="btn btn-default" value="执行中">
								<input type="button" class="btn btn-default" value="成功结束">
								<input type="button" class="btn btn-default" value="意外终止">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>付款方式：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="支票">
								<input type="button" class="btn btn-default" value="现金">
								<input type="button" class="btn btn-default" value="银行转账">
								<input type="button" class="btn btn-default" value="其它">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>产品筛选：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部产品</option>
									<option>产品1</option>
									<option>产品2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>对应客户：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部客户</option>
									<option>客户1</option>
									<option>客户2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>创建时间：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="今天">
								<input type="button" class="btn btn-default" value="昨天">
								<input type="button" class="btn btn-default" value="本周">
								<input type="button" class="btn btn-default" value="上周">
								<input type="button" class="btn btn-default" value="本月">
								<input type="button" class="btn btn-default" value="上月">
								<input type="text" class="btn btn-default" name="daterange"
									value="" />
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>所属部门：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>请选择部门</option>
									<option>销售部</option>
									<option>营销部</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>负责人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>请选择用户</option>
									<option>张三</option>
									<option>李四</option>
									<option>其他</option>
								</select>
							</div>
						</div>
					</div>
					<!--我的合同-->
					<div class="tab-pane fade" id="myClue">
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>合同状态：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="签约">
								<input type="button" class="btn btn-default" value="执行中">
								<input type="button" class="btn btn-default" value="成功结束">
								<input type="button" class="btn btn-default" value="意外终止">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>付款方式：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="支票">
								<input type="button" class="btn btn-default" value="现金">
								<input type="button" class="btn btn-default" value="银行转账">
								<input type="button" class="btn btn-default" value="其它">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>产品筛选：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部产品</option>
									<option>产品1</option>
									<option>产品2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>对应客户：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部客户</option>
									<option>客户1</option>
									<option>客户2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>创建时间：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="今天">
								<input type="button" class="btn btn-default" value="昨天">
								<input type="button" class="btn btn-default" value="本周">
								<input type="button" class="btn btn-default" value="上周">
								<input type="button" class="btn btn-default" value="本月">
								<input type="button" class="btn btn-default" value="上月">
								<input type="text" class="btn btn-default" name="daterange"
									value="" />
							</div>
						</div>
					</div>
					<!--我协作的合同-->
					<div class="tab-pane fade" id="customer">
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>合同状态：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="签约">
								<input type="button" class="btn btn-default" value="执行中">
								<input type="button" class="btn btn-default" value="成功结束">
								<input type="button" class="btn btn-default" value="意外终止">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>付款方式：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="支票">
								<input type="button" class="btn btn-default" value="现金">
								<input type="button" class="btn btn-default" value="银行转账">
								<input type="button" class="btn btn-default" value="其它">
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>产品筛选：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部产品</option>
									<option>产品1</option>
									<option>产品2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>对应客户：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>全部客户</option>
									<option>客户1</option>
									<option>客户2</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<span>创建时间：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="button" class="btn btn-default" value="全部">
								<input type="button" class="btn btn-default" value="今天">
								<input type="button" class="btn btn-default" value="昨天">
								<input type="button" class="btn btn-default" value="本周">
								<input type="button" class="btn btn-default" value="上周">
								<input type="button" class="btn btn-default" value="本月">
								<input type="button" class="btn btn-default" value="上月">
								<input type="text" class="btn btn-default" name="daterange"
									value="" />
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>所属部门：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>请选择部门</option>
									<option>销售部</option>
									<option>营销部</option>
									<option>其他</option>
								</select>
							</div>
						</div>
						<div class="btn-toolbar" role="toolbar">
							<div class="panel-body">
								<div style="float: left">
									<span>负责人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
								</div>
								<select class="btn btn-default" style="float: left">
									<option>请选择用户</option>
									<option>张三</option>
									<option>李四</option>
									<option>其他</option>
								</select>
							</div>
						</div>
					</div>
					<!--我的草稿-->
					<div class="tab-pane fade" id="caogao"></div>

				</div>

				<!-- /. ROW  -->
				<!--数据（从数据库中读取）-->
				<form action="">
					<table class="table table-striped">
						<caption>
							<div>
								<span style="float: left">已选0件合同&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<button type="button" class="btn btn-default"
									style="float: left">
									<i class="fa fa-share fa-fw"></i> &nbsp;&nbsp;删除&nbsp;&nbsp;
								</button>

								<button type="button" class="btn btn-default"
									data-toggle="modal" data-target="#addClue" style="float: left">
									<i class="fa fa-pencil fa-fw"></i> &nbsp;&nbsp;修改&nbsp;&nbsp;
								</button>
								<button type="button" class="btn btn-default"
									data-toggle="modal"  onclick="start()" style="float: left"id="xiugai">
									 &nbsp;&nbsp;提交合同&nbsp;&nbsp;
								</button>
							</div>
						</caption>
						<thead>
							<tr>
								<th>选择</th>
								<th>合同名称</th>
								<th>对应客户</th>
								<th>合同编号</th>
								<th>签约日期</th>
								<th>合同状态</th>
								<th>对应产品</th>
							</tr>
						</thead>
						<tbody id="contractbody">
							

						</tbody>
					</table>
				</form>
				<ul class="pager">
					<br />
					<li>共有<span id="totalNum"></span>条数据&nbsp;&nbsp;&nbsp;&nbsp;
						当前第<span id="pageno"></span>页，共<span id="totalpage"> </span>页
					</li>
					<li class="previous"><a id="a1">&larr;上一页</a></li>
					<li class="next"><a id="a2">下一页 &rarr;</a></li>
				</ul>




				<footer>

					<br /> <br /> <br />

					<p style="text-align: center">Copyright &copy; 2018.资鹏毕业设计All rights reserved.
						</p>


				</footer>
			</div>
			<!-- /. PAGE INNER  -->
		</div>
		<!-- /. PAGE WRAPPER  -->
	</div>
	<!-- /. WRAPPER  -->
	<!-- JS Scripts-->

	<!-- Metis Menu Js -->
	<script src="assets/js/jquery.metisMenu.js"></script>
	<!-- Morris Chart Js -->
	<script src="assets/js/morris/raphael-2.1.0.min.js"></script>
	<script src="assets/js/morris/morris.js"></script>


	<script src="assets/js/easypiechart.js"></script>
	<script src="assets/js/easypiechart-data.js"></script>

	<script src="assets/js/Lightweight-Chart/jquery.chart.js"></script>

	<!-- Custom Js -->
	<script src="assets/js/custom-scripts.js"></script>




	<script>
        var cityPicker = new IIInsomniaCityPicker({
            data: cityData,
            target: '#cityChoice',
            valType: 'k-v',
            hideCityInput: '#city',
            hideProvinceInput: '#province',
            callback: function(city_id){
                $('#cityChoice').html(city_id);
            }
        });

        cityPicker.init();
    </script>
	<script>
        var cityPicker = new IIInsomniaCityPicker({
            data: cityData,
            target: '#cityChoice2',
            valType: 'k-v',
            hideCityInput: '#city2',
            hideProvinceInput: '#province2',
            callback: function(city_id){
                $('#cityChoice2').html(city_id);
            }
        });

        cityPicker.init();
    </script>

	<script>
        var cityPicker = new IIInsomniaCityPicker({
            data: cityData,
            target: '#cityChoice3',
            valType: 'k-v',
            hideCityInput: '#city3',
            hideProvinceInput: '#province3',
            callback: function(city_id){
                $('#cityChoice3').html(city_id);
            }
        });

        cityPicker.init();
    </script>


</body>

</html>